var sbi_js_exists=(typeof sbi_js_exists!=='undefined')?!0:!1;if(!sbi_js_exists){(function(){var e,t;e=function(){function e(e,t){var n,r;this.options={target:"instafeed",get:"popular",resolution:"thumbnail",sortBy:"none",links:!0,mock:!1,useHttp:!1};if(typeof e=="object")for(n in e)r=e[n],this.options[n]=r;this.context=t!=null?t:this,this.unique=this._genKey()}return e.prototype.hasNext=function(){return typeof this.context.nextUrl=="string"&&this.context.nextUrl.length>0},e.prototype.next=function(){return this.hasNext()?this.run(this.context.nextUrl):!1},e.prototype.run=function(t){var n,r,i;if(typeof this.options.clientId!="string"&&typeof this.options.accessToken!="string")throw new Error("Missing clientId or accessToken.");if(typeof this.options.accessToken!="string"&&typeof this.options.clientId!="string")throw new Error("Missing clientId or accessToken.");return this.options.before!=null&&typeof this.options.before=="function"&&this.options.before.call(this),typeof document!="undefined"&&document!==null&&(i=document.createElement("script"),i.id="instafeed-fetcher",i.src=t||this._buildUrl(),n=document.getElementsByTagName("head"),n[0].appendChild(i),r="instafeedCache"+this.unique,window[r]=new e(this.options,this),window[r].unique=this.unique),!0},e.prototype.parse=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S;if(typeof e!="object"){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,"Invalid JSON data"),!1;throw new Error("Invalid JSON response")}if(e.meta.code!==200){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,e.meta.error_message),!1;throw new Error("Error from Instagram: "+e.meta.error_message)}if(e.data.length===0){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,"No images were returned from Instagram"),!1;throw new Error("No images were returned from Instagram")}this.options.success!=null&&typeof this.options.success=="function"&&this.options.success.call(this,e),this.context.nextUrl="",e.pagination!=null&&(this.context.nextUrl=e.pagination.next_url);if(this.options.sortBy!=="none"){this.options.sortBy==="random"?d=["","random"]:d=this.options.sortBy.split("-"),p=d[0]==="least"?!0:!1;switch(d[1]){case"random":e.data.sort(function(){return.5-Math.random()});break;case"recent":e.data=this._sortBy(e.data,"created_time",p);break;case"liked":e.data=this._sortBy(e.data,"likes.count",p);break;case"commented":e.data=this._sortBy(e.data,"comments.count",p);break;default:throw new Error("Invalid option for sortBy: '"+this.options.sortBy+"'.")}}if(typeof document!="undefined"&&document!==null&&this.options.mock===!1){a=e.data,this.options.limit!=null&&a.length>this.options.limit&&(a=a.slice(0,this.options.limit+1||9e9)),n=document.createDocumentFragment(),this.options.filter!=null&&typeof this.options.filter=="function"&&(a=this._filter(a,this.options.filter));if(this.options.template!=null&&typeof this.options.template=="string"){i="",o="",l="",v=document.createElement("div");for(m=0,b=a.length;ms?1:-1:i=0?u:o+u;var a=n?n:o;if(n<0){a=o+n}s=a-u;if(s>0){i=new Array(s);if(this.charAt){for(r=0;r320&&feedWidth<480)&&sbiWindowWidth<480)colWidth=480;if(feedWidth<320&&sbiWindowWidth<480)colWidth=300} if(colWidth<150){imgRes='thumbnail'}else if(colWidth<320){imgRes='low_resolution'}else{imgRes='standard_resolution'} if(feedWidth<=100)imgRes='low_resolution';break;case 'thumb':imgRes='thumbnail';break;case 'medium':imgRes='low_resolution';break;default:imgRes='standard_resolution'} var ids_arr=user_id.replace(/ /g,'').split(",");var looparray=ids_arr;var headerStyles='',sbi_page_url='https://api.instagram.com/v1/users/'+ids_arr[0]+'?access_token='+sb_instagram_js_options.sb_instagram_at;if(feedOptions.headercolor.length)headerStyles='style="color: #'+feedOptions.headercolor+'"';jQuery.ajax({method:"GET",url:sbi_page_url,dataType:"jsonp",success:function(data){var sbiErrorResponse=data.meta.error_message;if(typeof sbiErrorResponse==='undefined'){$header='';$header+='
';$header+='

';if(data.data.bio.length&&feedOptions.showbio==="true")$header+='

'+data.data.bio+'

';$header+='

';$header+='
';$header+='
';$header+=''+data.data.full_name+'';$header+='
';$header+='
';$self.find('.sb_instagram_header').prepend($header);if($self.find('.sbi_follow_btn').length)$self.find('.sbi_follow_btn a').attr('href','https://instagram.com/'+data.data.username)}}});jQuery.each(looparray,function(index,entry){window.sbiFeedMeta[$i].idsInFeed.push(entry);var userFeed=new instagramfeed({target:$target,get:getType,sortBy:sortby,resolution:imgRes,limit:parseInt(num,10),template:'
{{caption}}
',filter:function(image){var date=new Date(image.created_time*1000),time=date.getTime();image.created_time_raw=time;if(image.caption!=null)image.caption.text=image.caption.text.replace(/[^a-zA-Z ]/g,"");image.images.thumbnail.url=image.images.thumbnail.url.split("?ig_cache_key")[0];image.images.standard_resolution.url=image.images.standard_resolution.url.split("?ig_cache_key")[0];image.images.low_resolution.url=image.images.low_resolution.url.split("?ig_cache_key")[0];return!0},userId:parseInt(entry,10),accessToken:sb_instagram_js_options.sb_instagram_at,after:function(){$self.find('.sbi_loader').remove();if(this.hasNext())morePosts.push('1');if(morePosts.length>0){$loadBtn.show()}else{$loadBtn.hide();$self.css('padding-bottom',0)} if(typeof sbi_custom_js=='function')setTimeout(function(){sbi_custom_js()},100);if(imgRes!=='thumbnail'){var sbi_imgLiquid=sbi_imgLiquid||{VER:"0.9.944"};sbi_imgLiquid.bgs_Available=!1,sbi_imgLiquid.bgs_CheckRunned=!1,function(i){function t(){if(!sbi_imgLiquid.bgs_CheckRunned){sbi_imgLiquid.bgs_CheckRunned=!0;var t=i('');i("body").append(t),!function(){var i=t[0];if(i&&window.getComputedStyle){var e=window.getComputedStyle(i,null);e&&e.backgroundSize&&(sbi_imgLiquid.bgs_Available="cover"===e.backgroundSize)}}(),t.remove()}}i.fn.extend({sbi_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},t();var a=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(t){function e(){-1===u.css("background-image").indexOf(encodeURI(c.attr("src")))&&u.css({"background-image":'url("'+encodeURI(c.attr("src"))+'")'}),u.css({"background-size":g.fill?"cover":"contain","background-position":(g.horizontalAlign+" "+g.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",u).css({display:"block",width:"100%",height:"100%"}),i("img",u).css({display:"none"}),g.onItemFinish&&g.onItemFinish(t,u,c),u.addClass("sbi_imgLiquid_bgSize"),u.addClass("sbi_imgLiquid_ready"),l()}function o(){function e(){c.data("sbi_imgLiquid_error")||c.data("sbi_imgLiquid_loaded")||c.data("sbi_imgLiquid_oldProcessed")||(u.is(":visible")&&c[0].complete&&c[0].width>0&&c[0].height>0?(c.data("sbi_imgLiquid_loaded",!0),setTimeout(r,t*g.delay)):setTimeout(e,g.timecheckvisibility))}if(c.data("oldSrc")&&c.data("oldSrc")!==c.attr("src")){var a=c.clone().removeAttr("style");return a.data("sbi_imgLiquid_settings",c.data("sbi_imgLiquid_settings")),c.parent().prepend(a),c.remove(),c=a,c[0].width=0,void setTimeout(o,10)}return c.data("sbi_imgLiquid_oldProcessed")?void r():(c.data("sbi_imgLiquid_oldProcessed",!1),c.data("oldSrc",c.attr("src")),i("img:not(:first)",u).css("display","none"),u.css({overflow:"hidden"}),c.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),c.on("error",n),c[0].onerror=n,e(),void d())}function d(){(g.responsive||c.data("sbi_imgLiquid_oldProcessed"))&&c.data("sbi_imgLiquid_settings")&&(g=c.data("sbi_imgLiquid_settings"),u.actualSize=u.get(0).offsetWidth+u.get(0).offsetHeight/1e4,u.sizeOld&&u.actualSize!==u.sizeOld&&r(),u.sizeOld=u.actualSize,setTimeout(d,g.responsiveCheckTime))}function n(){c.data("sbi_imgLiquid_error",!0),u.addClass("sbi_imgLiquid_error"),g.onItemError&&g.onItemError(t,u,c),l()}function s(){var i={};if(a.settings.useDataHtmlAttr){var t=u.attr("data-sbi_imgLiquid-fill"),e=u.attr("data-sbi_imgLiquid-horizontalAlign"),o=u.attr("data-sbi_imgLiquid-verticalAlign");("true"===t||"false"===t)&&(i.fill=Boolean("true"===t)),void 0===e||"left"!==e&&"center"!==e&&"right"!==e&&-1===e.indexOf("%")||(i.horizontalAlign=e),void 0===o||"top"!==o&&"bottom"!==o&&"center"!==o&&-1===o.indexOf("%")||(i.verticalAlign=o)}return sbi_imgLiquid.isIE&&a.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}function r(){var i,e,a,o,d,n,s,r,m=0,h=0,f=u.width(),v=u.height();void 0===c.data("owidth")&&c.data("owidth",c[0].width),void 0===c.data("oheight")&&c.data("oheight",c[0].height),g.fill===f/v>=c.data("owidth")/c.data("oheight")?(i="100%",e="auto",a=Math.floor(f),o=Math.floor(f*(c.data("oheight")/c.data("owidth")))):(i="auto",e="100%",a=Math.floor(v*(c.data("owidth")/c.data("oheight"))),o=Math.floor(v)),d=g.horizontalAlign.toLowerCase(),s=f-a,"left"===d&&(h=0),"center"===d&&(h=.5*s),"right"===d&&(h=s),-1!==d.indexOf("%")&&(d=parseInt(d.replace("%",""),10),d>0&&(h=s*d*.01)),n=g.verticalAlign.toLowerCase(),r=v-o,"left"===n&&(m=0),"center"===n&&(m=.5*r),"bottom"===n&&(m=r),-1!==n.indexOf("%")&&(n=parseInt(n.replace("%",""),10),n>0&&(m=r*n*.01)),g.hardPixels&&(i=a,e=o),c.css({width:i,height:e,"margin-left":Math.floor(h),"margin-top":Math.floor(m)}),c.data("sbi_imgLiquid_oldProcessed")||(c.fadeTo(g.fadeInTime,1),c.data("sbi_imgLiquid_oldProcessed",!0),g.removeBoxBackground&&u.css("background-image","none"),u.addClass("sbi_imgLiquid_nobgSize"),u.addClass("sbi_imgLiquid_ready")),g.onItemFinish&&g.onItemFinish(t,u,c),l()}function l(){t===a.length-1&&a.settings.onFinish&&a.settings.onFinish()}var g=a.settings,u=i(this),c=i("img:first",u);return c.length?(c.data("sbi_imgLiquid_settings")?(u.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),g=i.extend({},c.data("sbi_imgLiquid_settings"),a.options)):g=i.extend({},a.settings,s()),c.data("sbi_imgLiquid_settings",g),g.onItemStart&&g.onItemStart(t,u,c),void(sbi_imgLiquid.bgs_Available&&g.useBackgroundSize?e():o())):void n()})}})}(jQuery);!function(){var css=sbi_imgLiquid.injectCss,head=document.getElementsByTagName('head')[0],style=document.createElement('style');style.type='text/css';if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))} head.appendChild(style)}();$self.find(".sbi_photo").sbi_imgLiquid({fill:!0})} var sbi_delay=(function(){var sbi_timer=0;return function(sbi_callback,sbi_ms){clearTimeout(sbi_timer);sbi_timer=setTimeout(sbi_callback,sbi_ms)}})();jQuery(window).resize(function(){sbi_delay(function(){sbiSetPhotoHeight()},500)});function sbiSetPhotoHeight(){if(imgRes!=='thumbnail'){var sbi_photo_width=$self.find('.sbi_photo').eq(0).innerWidth();var sbi_num_cols=parseInt(cols);if(!$self.hasClass('sbi_disable_mobile')){var sbiWindowWidth=jQuery(window).width();if(sbiWindowWidth<640&&(parseInt(cols)>2&&parseInt(cols)<7))sbi_num_cols=2;if(sbiWindowWidth<640&&(parseInt(cols)>6&&parseInt(cols)<11))sbi_num_cols=4;if(sbiWindowWidth<=480&&parseInt(cols)>2)sbi_num_cols=1} var sbi_photo_width_manual=($self.find('#sbi_images').width()/sbi_num_cols)-(feedOptions.imagepadding*2);if(sbi_photo_width<=(sbi_photo_width_manual))sbi_photo_width=sbi_photo_width_manual;$self.find('.sbi_photo').css('height',sbi_photo_width)}} sbiSetPhotoHeight();!function(i){var n={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},c={};c.sbiCheckVisibility=function(i,n){if(jQuery.contains(document,i[0])){var e=n.sbiPreviousVisibility,t=i.is(":visible");n.sbiPreviousVisibility=t,null==e?n.runOnLoad&&n.callback(i,t):e!==t&&n.callback(i,t),setTimeout(function(){c.sbiCheckVisibility(i,n)},n.frequency)}},i.fn.sbiVisibilityChanged=function(e){var t=i.extend({},n,e);return this.each(function(){c.sbiCheckVisibility(i(this),t)})}}(jQuery);jQuery(".sbi").filter(':hidden').sbiVisibilityChanged({callback:function(element,visible){sbiSetPhotoHeight()},runOnLoad:!1});jQuery('#sb_instagram .sbi_photo').each(function(){$sbi_photo=jQuery(this);$sbi_photo.hover(function(){jQuery(this).fadeTo(200,0.85)},function(){jQuery(this).stop().fadeTo(500,1)});if($sbi_photo.closest('.sbi_item').hasClass('sbi_type_video')){if(!$sbi_photo.find('.sbi_playbtn').length)$sbi_photo.append('')}});$self.find('#sbi_images .sbi_item.sbi_new').sort(function(a,b){var aComp=jQuery(a).data('date'),bComp=jQuery(b).data('date');if(sortby=='none'){return bComp-aComp}else{return(Math.round(Math.random())-0.5)}}).appendTo($self.find("#sbi_images"));setTimeout(function(){jQuery('#sbi_images .sbi_item.sbi_new').removeClass('sbi_new');morePosts=[]},500);function sbiGetItemSize(){$self.removeClass('sbi_small sbi_medium');var sbiItemWidth=$self.find('.sbi_item').innerWidth();if(sbiItemWidth>120&&sbiItemWidth<240){$self.addClass('sbi_medium')}else if(sbiItemWidth<=120){$self.addClass('sbi_small')}} sbiGetItemSize()},error:function(data){var sbiErrorMsg='',sbiErrorDir='',sbiErrorResponse=data;if(sbiErrorResponse.indexOf('access_token')>-1){sbiErrorMsg+='

Error: Access Token is not valid or has expired
This error message is only visible to WordPress admins';sbiErrorDir="

There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page.
If you continue to have an issue with your Access Token then please see this FAQ for more information.";jQuery('#sb_instagram').empty().append('

Unable to show Instagram photos

'+sbiErrorMsg+sbiErrorDir+'
');return}else if(sbiErrorResponse.indexOf('user does not exist')>-1||sbiErrorResponse.indexOf('you cannot view this resource')>-1){window.sbiFeedMeta[$i].error={errorMsg:'

Error: User ID '+window.sbiFeedMeta[$i].idsInFeed[index]+' does not exist, is invalid, or is private
This error is only visible to WordPress admins',errorDir:"

Please double check the Instagram User ID that you are using and ensure that it is valid and not from a private account. To find your User ID simply enter your Instagram user name into this tool.

"};if(!$self.find('#sbi_mod_error').length){$self.prepend('
'+window.sbiFeedMeta[$i].error.errorMsg+window.sbiFeedMeta[$i].error.errorDir+'
')}else if($self.find('.sbiErrorIds').text().indexOf(window.sbiFeedMeta[$i].idsInFeed[index])==-1){$self.find('.sbiErrorIds').append(','+window.sbiFeedMeta[$i].idsInFeed[index])}}else if(sbiErrorResponse.indexOf('No images were returned')>-1){window.sbiFeedMeta[$i].error={errorMsg:'

Error: User ID '+window.sbiFeedMeta[$i].idsInFeed[index]+' has no posts
This error is only visible to WordPress admins',errorDir:"

If you are the owner of this account, make a post on Instagram to see it in your feed.

"};if(!$self.find('#sbi_mod_error.sbi_error_none').length){$self.prepend('
'+window.sbiFeedMeta[$i].error.errorMsg+window.sbiFeedMeta[$i].error.errorDir+'
')}else if($self.find('.sbiErrorNone').text().indexOf(window.sbiFeedMeta[$i].idsInFeed[index])==-1){$self.find('.sbiErrorNone').append(','+window.sbiFeedMeta[$i].idsInFeed[index])}}}});$loadBtn.click(function(){userFeed.next()});userFeed.run()})})} jQuery(document).ready(function(){sbi_init()})}; var socialWarfarePlugin=socialWarfarePlugin||{};!function(a,b){var c,d=a.socialWarfarePlugin;d.throttle=c=function(a,c,e,f){function g(){function d(){i=+new Date,e.apply(j,l)}function g(){h=b}var j=this,k=+new Date-i,l=arguments;f&&!h&&d(),h&&clearTimeout(h),f===b&&k>a?d():c!==!0&&(h=setTimeout(f?g:d,f===b?a-k:a))}var h,i=0;return"boolean"!=typeof c&&(f=e,e=c,c=b),d.guid&&(g.guid=e.guid=e.guid||d.guid++),g},d.debounce=function(a,d,e){return e===b?c(a,d,!1):c(a,e,d!==!1)}}(this),function(a,b,c){"use strict";function d(a){return parseInt(a,10)}function e(c){var d=b.Event(c);b(a).trigger(d)}function f(){b(".nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:not(.swp_nohover) .iconFiller").removeAttr("style"),b(".nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:not(.swp_nohover)").removeAttr("style")}function g(){b(".nc_wrapper").length&&b(".nc_wrapper").remove();var a=b(".nc_socialPanel").not('[data-float="float_ignore"]').first(),c=(b(".nc_socialPanel").index(a),a.attr("data-float")),d=a.attr("data-align");if(c){var e=b(".nc_socialPanel").attr("data-floatColor");b('
').appendTo("body");var f=a.attr("data-float");a.clone().appendTo(".nc_wrapper"),b(".nc_wrapper").hide().addClass("floatLeft"==f?"floatBottom":f);var g=a.outerWidth(!0),h=a.offset();b(".nc_socialPanel").last().addClass("nc_floater").css({width:g,left:"center"==d?0:h.left}),b(".nc_socialPanel .swp_count").css({transition:"padding .1s linear"}),b(".nc_socialPanel").eq(0).addClass("swp_one"),b(".nc_socialPanel").eq(2).addClass("swp_two"),b(".nc_socialPanel").eq(1).addClass("swp_three")}}function h(){var c=b(".nc_socialPanel"),d=c.not('[data-float="float_ignore"]').eq(0).attr("data-float"),f=b(a),g=f.height(),h=b(".nc_wrapper"),i=b(".nc_socialPanelSide").filter(":not(.mobile)"),j=(b(".nc_socialPanel").attr("data-position"),i.attr("data-screen-width")),k=c.eq(0).offset(),l=f.scrollTop();b(a).scrollTop();"undefined"==typeof a.swpOffsets&&(a.swpOffsets={});var m=!1;if("floatLeft"==d){var n=b(".nc_socialPanelSide").attr("data-mobileFloat");b(".nc_socialPanel").not(".nc_socialPanelSide").length?(b(".nc_socialPanel").not(".nc_socialPanelSide, .nc_floater").each(function(){var a=b(this).offset(),c=b(this).height();a.top+c>l&&a.topj?m=!1:(m=!0,"bottom"==n&&(d="floatBottom"));var o=i.attr("data-transition");"slide"==o?1==m?i.css({left:"-100px"},200):i.css({left:"5px"}):"fade"==o&&(1==m?i.fadeOut(200):i.fadeIn(200))}if("floatBottom"==d||"floatTop"==d)if(m=!1,b(".nc_socialPanel").not(".nc_socialPanelSide, .nc_floater").each(function(){var a=b(this).offset(),c=b(this).height();a.top+c>l&&a.topl+g&&(p=a.bodyPaddingTop+50,b("body").animate({"padding-top":p+"px"},0)))}}function i(){0!==b(".nc_socialPanel").length&&(g(),l.activateHoverStates(),k(),b(a).scrollTop(),b(a).scroll(l.throttle(50,function(){h()})),b(a).trigger("scroll"),b(".nc_socialPanel").css({opacity:1}))}function j(){var c={wrap:'
',pageURL:document.URL},d=b.extend(c,d);b(".swp-content-locator").parent().find("img").each(function(){var c=b(this);if(!(c.outerHeight()Save'),c.parent(".sw-pinit").addClass(h).attr("style",i),b(".sw-pinit .sw-pinit-button").on("click",function(){return a.open(b(this).attr("href"),"Pinterest","width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1"),!1})}}})}function k(){b(".nc_tweet, a.swp_CTT").off("click"),b(".nc_tweet, a.swp_CTT").on("click",function(c){if(b(this).hasClass("noPop"))return!1;if(console.log(b(this)),b(this).attr("data-link")){c.preventDefault?c.preventDefault():c.returnValue=!1;var d=b(this).attr("data-link");console.log(d);var e,f,g;if(d=d.replace("’","'"),b(this).hasClass("pinterest")||b(this).hasClass("buffer_link")||b(this).hasClass("flipboard")?(e=550,f=775):(e=270,f=500),g=a.open(d,"_blank","height="+e+",width="+f),"function"==typeof ga&&!0===swpClickTracking){var h=b(this).parents(".nc_tweetContainer").attr("data-network");console.log(h+" Button Clicked"),ga("send","event","social_media","swp_"+h+"_share")}return!1}})}var l=a.socialWarfarePlugin,m={};socialWarfarePlugin.fetchShares=function(){b.when(b.get("https://graph.facebook.com/?id="+swp_post_url),b.get("https://graph.facebook.com/?id="+swp_post_url+"&fields=og_object{likes.summary(true),comments.summary(true)}"),swp_post_recovery_url?b.get("https://graph.facebook.com/?id="+swp_post_recovery_url):"",swp_post_recovery_url?b.get("https://graph.facebook.com/?id="+swp_post_recovery_url+"&fields=og_object{likes.summary(true),comments.summary(true)}"):"").then(function(a,c,e,f){if("undefined"!=typeof a[0].share&&"undefined"!=typeof c[0].og_object){var g=d(a[0].share.share_count),h=d(c[0].og_object.likes.summary.total_count),i=d(c[0].og_object.comments.summary.total_count),j=g+h+i;if(swp_post_recovery_url){if("undefined"!=typeof e[0].share)var k=d(e[0].share.share_count);else var k=0;if("undefined"!=typeof f[0].og_object)var l=d(f[0].og_object.likes.summary.total_count),n=d(f[0].og_object.comments.summary.total_count);else var l=0,n=0;var o=k+l+n;j!==o&&(j+=o)}m={action:"swp_facebook_shares_update",post_id:swp_post_id,activity:j},b.post(swp_admin_ajax,m,function(a){console.log("Facebook Shares Response: "+a)})}})},l.activateHoverStates=function(){e("pre_activate_buttons"),b(".nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:not(.swp_nohover)").on("mouseenter",function(){f();var a=b(this).find(".swp_share").outerWidth(),c=b(this).find("i.sw").outerWidth(),d=b(this).width(),e=1+(a+35)/d;b(this).find(".iconFiller").width(a+c+25+"px"),b(this).css({flex:e+" 1 0%"})}),b(".nc_socialPanel:not(.nc_socialPanelSide)").on("mouseleave",function(){f()})},b(a).on("load",function(){"undefined"!=typeof swpPinIt&&swpPinIt.enabled&&j()}),b(document).ready(function(){k(),i(),a.bodyPaddingTop=d(b("body").css("padding-top").replace("px","")),a.bodyPaddingBottom=d(b("body").css("padding-bottom").replace("px",""));var c=!1;if(b(".nc_socialPanel").hover(function(){c=!0},function(){c=!1}),b(a).resize(l.debounce(250,function(){b(".nc_socialPanel").length&&!1!==c||(a.swpAdjust=1,i())})),b(document.body).on("post-load",function(){i()}),0!==b(".nc_socialPanelSide").length){var e=b(".nc_socialPanelSide").height(),f=b(a).height(),g=d(f/2-e/2);setTimeout(function(){b(".nc_socialPanelSide").animate({top:g},0)},105)}isMobile.phone&&b(".swp_whatsapp").addClass("mobile"),1===b(".swp-content-locator").parent().children().length&&b(".swp-content-locator").parent().hide()})}(this,jQuery),function(a){var b=/iPhone/i,c=/iPod/i,d=/iPad/i,e=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,f=/Android/i,g=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,h=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,i=/Windows Phone/i,j=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,k=/BlackBerry/i,l=/BB10/i,m=/Opera Mini/i,n=/(CriOS|Chrome)(?=.*\bMobile\b)/i,o=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,p=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),q=function(a,b){return a.test(b)},r=function(a){var r=a||navigator.userAgent,s=r.split("[FBAN");if("undefined"!=typeof s[1]&&(r=s[0]),s=r.split("Twitter"),"undefined"!=typeof s[1]&&(r=s[0]),this.apple={phone:q(b,r),ipod:q(c,r),tablet:!q(b,r)&&q(d,r),device:q(b,r)||q(c,r)||q(d,r)},this.amazon={phone:q(g,r),tablet:!q(g,r)&&q(h,r),device:q(g,r)||q(h,r)},this.android={phone:q(g,r)||q(e,r),tablet:!q(g,r)&&!q(e,r)&&(q(h,r)||q(f,r)),device:q(g,r)||q(h,r)||q(e,r)||q(f,r)},this.windows={phone:q(i,r),tablet:q(j,r),device:q(i,r)||q(j,r)},this.other={blackberry:q(k,r),blackberry10:q(l,r),opera:q(m,r),firefox:q(o,r),chrome:q(n,r),device:q(k,r)||q(l,r)||q(m,r)||q(o,r)||q(n,r)},this.seven_inch=q(p,r),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},s=function(){var a=new r;return a.Class=r,a};"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=r:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?module.exports=s():"function"==typeof define&&define.amd?define("isMobile",[],a.isMobile=s()):a.isMobile=s()}(this); jQuery(function($){ "use strict"; var $returnToTop=$('#return-to-top'); $(window).scroll(function(){ ($(this).scrollTop() >=50) ? $returnToTop.fadeIn(500):$returnToTop.fadeOut(500); }); $returnToTop.click(function(){ $('body,html').animate({ scrollTop:0 }, 500); }); });